//********************************************************************************************************************//
//ORGANIZATION:
//AUTHOR: bpeng(bogers.peng@gmail.com)
//SUMMARY:
//********************************************************************************************************************//
#include "../Scene.h"

using namespace Native::System;

CScene::CScene() :
    _line(0)
{
}

CScene::CScene(C_SCENE& that) :
    CObject(that),
    _class(that._class),
    _method(that._method),
    _line(that._line)
{
}

CScene::CScene(C_SCENE&& that) :
    CObject(that),
    _class(that._class),
    _method(that._method),
    _line(that._line)
{
}

CScene::CScene(WSTRING& class_name, WSTRING& method, uint32_t line) :
    _class(class_name),
    _method(method),
    _line(line)
{
}

wstring CScene::ToString() const
{
    wchar_t buffer[2048] = {0};
    swprintf(buffer, L"%s::%s()#%d", _class.c_str(), _method.c_str(), _line);

    return wstring(buffer);
}


bool CScene::operator==(C_SCENE& rvalue) const
{
    return
        _class == rvalue._class &&
        _method == rvalue._method &&
        _line == rvalue._line;
}

bool CScene::operator!=(C_SCENE& rvalue) const
{
    return !operator==(rvalue);
}

C_SCENE& CScene::operator=(C_SCENE& rvalue)
{
    _class = rvalue._class;
    _method = rvalue._method;
    _line = rvalue._line;

    return *this;
}
